<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="/common/template :: header(~{::title},~{::link},~{::style})"></head>
<body>
<style>
    .serviceType{
        padding-left: 0px;
        white-space:nowrap;
    }
</style>
<form class="layui-form" action="" lay-filter="service_type-add-form" style="height: 100%;margin-top: 20px;margin-left: 20%">
    <!--  padding:9px 0;-->
    <!--  -->
    <div class="layui-form-item">
        <label class="layui-form-label serviceType" >服务类型名称：</label>
        <div class="layui-input-inline">
            <input id="serviceTypeName" name="serviceTypeName" placeholder="请输入服务类型名称"
                   class="layui-input" lay-verify="required" autocomplete="off" style="width: 90%!important;">
        </div>
    </div>
    <!--  -->
    <div class="layui-form-item">
        <label class="layui-form-label serviceType" >是否汽车行业：</label>
        <div class="layui-input-inline">
            <input type="radio" name="isShopAvailable" value="1" title="是">
            <input type="radio" name="isShopAvailable" value="0" title="否" checked>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit="" lay-filter="service_type-add">立即提交</button>
        </div>
    </div>
</form>
<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
<script th:replace="/common/template :: script"></script>
<script>
    layui.use([ 'layer', 'jquery', 'form', 'laydate' ], function() {
        var $ = layui.jquery;
        var laydate = layui.laydate;
        var layer = layui.layer;
        var form = layui.form;
        //日期时间选择器
        //监听提交
        form.on('submit(service_type-add)', function(data) {
            //提交数据data.field

            CoreUtil.ajaxPostLoad("/service/type/save", data.field,true,parent.active);
            return false;
        });
    });
</script>
</body>
</html>